package com.haofengsoft.scce.db;

import java.util.Map;

import android.database.sqlite.SQLiteDatabase;

import com.haofengsoft.scce.db.bean.AdvertInfo;
import com.haofengsoft.scce.db.bean.AttentionItem;
import com.haofengsoft.scce.db.dao.AdvertInfoDao;
import com.haofengsoft.scce.db.dao.CollectingOperLogDao;
import com.haofengsoft.scce.db.dao.MarketOverViewDao;
import com.haofengsoft.scce.db.dao.StoneGoldDao;
import com.haofengsoft.scce.db.dao.consultation.AttentionItemDao;
import com.haofengsoft.scce.db.dao.consultation.BeiJingDao;
import com.haofengsoft.scce.db.dao.consultation.DailyLimitBoardDao;
import com.haofengsoft.scce.db.dao.consultation.FocusNewDao;
import com.haofengsoft.scce.db.dao.consultation.GuestColumnDao;
import com.haofengsoft.scce.db.dao.consultation.NanJingDao;
import com.haofengsoft.scce.db.dao.consultation.OptionalStampDao;
import com.haofengsoft.scce.db.dao.consultation.ShangHaiDao;
import com.haofengsoft.scce.db.dao.consultation.ZhongNanDao;
import com.haofengsoft.scce.db.entity.CollectingOperLog;
import com.haofengsoft.scce.db.entity.consultation.BeiJing;
import com.haofengsoft.scce.db.entity.consultation.DailyLimitBoard;
import com.haofengsoft.scce.db.entity.consultation.FocusNew;
import com.haofengsoft.scce.db.entity.consultation.GuestColumn;
import com.haofengsoft.scce.db.entity.consultation.MarketOverView;
import com.haofengsoft.scce.db.entity.consultation.NanJing;
import com.haofengsoft.scce.db.entity.consultation.OptionalStamp;
import com.haofengsoft.scce.db.entity.consultation.ShangHai;
import com.haofengsoft.scce.db.entity.consultation.StoneGold;
import com.haofengsoft.scce.db.entity.consultation.ZhongNan;

import de.greenrobot.dao.AbstractDao;
import de.greenrobot.dao.AbstractDaoSession;
import de.greenrobot.dao.identityscope.IdentityScopeType;
import de.greenrobot.dao.internal.DaoConfig;

// THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT.

/**
 * {@inheritDoc}
 * 
 * @see de.greenrobot.dao.AbstractDaoSession
 */
public class DaoSession extends AbstractDaoSession {

	private final DaoConfig advertInfoDaoConfig;
	private final DaoConfig attentionItemDaoConfig;
	private final DaoConfig focusNewDaoConfig;
	private final DaoConfig nanJingDaoConfig;
	private final DaoConfig beiJingDaoConfig;
	private final DaoConfig shangHaiDaoConfig;
	private final DaoConfig zhongNanDaoConfig;
	private final DaoConfig dailyLimitBoardDaoConfig;
	private final DaoConfig guestColumnDaoConfig;
	private final DaoConfig marketOverViewDaoConfig;
	private final DaoConfig optionalStampDaoConfig;
	private final DaoConfig stoneGoldDaoConfig;
    private final DaoConfig collectingOperLogDaoConfig;

	private final AdvertInfoDao advertInfoDao;
	private final FocusNewDao focusNewDao;
	private final NanJingDao nanJingDao;
	private final BeiJingDao beiJingDao;
	private final ShangHaiDao shangHaiDao;
	private final ZhongNanDao zhongNanDao;
	private final DailyLimitBoardDao dailyLimitBoardDao;
	private final GuestColumnDao guestColumnDao;
	private final MarketOverViewDao marketOverViewDao;
	private final OptionalStampDao optionalStampDao;
	private final StoneGoldDao stoneGoldDao;

	private final AttentionItemDao attentionItemDao;
    private final CollectingOperLogDao collectingOperLogDao;
	public DaoSession(SQLiteDatabase db, IdentityScopeType type,
			Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> daoConfigMap) {
		super(db);
		advertInfoDaoConfig = daoConfigMap.get(AdvertInfoDao.class).clone();
		advertInfoDaoConfig.initIdentityScope(type);

		focusNewDaoConfig = daoConfigMap.get(FocusNewDao.class).clone();
		focusNewDaoConfig.initIdentityScope(type);

		attentionItemDaoConfig = daoConfigMap.get(AttentionItemDao.class).clone();
		attentionItemDaoConfig.initIdentityScope(type);

		nanJingDaoConfig = daoConfigMap.get(NanJingDao.class).clone();
		nanJingDaoConfig.initIdentityScope(type);

		beiJingDaoConfig = daoConfigMap.get(BeiJingDao.class).clone();
		beiJingDaoConfig.initIdentityScope(type);

		shangHaiDaoConfig = daoConfigMap.get(ShangHaiDao.class).clone();
		shangHaiDaoConfig.initIdentityScope(type);

		zhongNanDaoConfig = daoConfigMap.get(ZhongNanDao.class).clone();
		zhongNanDaoConfig.initIdentityScope(type);

		dailyLimitBoardDaoConfig = daoConfigMap.get(DailyLimitBoardDao.class).clone();
		dailyLimitBoardDaoConfig.initIdentityScope(type);

		guestColumnDaoConfig = daoConfigMap.get(GuestColumnDao.class).clone();
		guestColumnDaoConfig.initIdentityScope(type);

		marketOverViewDaoConfig = daoConfigMap.get(MarketOverViewDao.class).clone();
		marketOverViewDaoConfig.initIdentityScope(type);

		optionalStampDaoConfig = daoConfigMap.get(OptionalStampDao.class).clone();
		optionalStampDaoConfig.initIdentityScope(type);

		stoneGoldDaoConfig = daoConfigMap.get(StoneGoldDao.class).clone();
		stoneGoldDaoConfig.initIdentityScope(type);

        collectingOperLogDaoConfig = daoConfigMap.get(CollectingOperLogDao.class).clone();
        collectingOperLogDaoConfig.initIdentityScope(type);

		advertInfoDao = new AdvertInfoDao(advertInfoDaoConfig, this);
		attentionItemDao = new AttentionItemDao(attentionItemDaoConfig, this);
		focusNewDao = new FocusNewDao(focusNewDaoConfig, this);
		nanJingDao = new NanJingDao(nanJingDaoConfig, this);
		beiJingDao = new BeiJingDao(beiJingDaoConfig, this);
		shangHaiDao = new ShangHaiDao(shangHaiDaoConfig, this);
		zhongNanDao = new ZhongNanDao(zhongNanDaoConfig, this);
		dailyLimitBoardDao = new DailyLimitBoardDao(dailyLimitBoardDaoConfig, this);
		guestColumnDao = new GuestColumnDao(guestColumnDaoConfig, this);
		marketOverViewDao = new MarketOverViewDao(marketOverViewDaoConfig, this);
		optionalStampDao = new OptionalStampDao(optionalStampDaoConfig, this);
		stoneGoldDao = new StoneGoldDao(stoneGoldDaoConfig, this);
        collectingOperLogDao = new CollectingOperLogDao(collectingOperLogDaoConfig, this);

		registerDao(AdvertInfo.class, advertInfoDao);
		registerDao(AttentionItem.class, attentionItemDao);
		registerDao(FocusNew.class, focusNewDao);
		registerDao(NanJing.class, nanJingDao);
		registerDao(BeiJing.class, beiJingDao);
		registerDao(ShangHai.class, shangHaiDao);
		registerDao(ZhongNan.class, zhongNanDao);
		registerDao(DailyLimitBoard.class, dailyLimitBoardDao);
		registerDao(GuestColumn.class, guestColumnDao);
		registerDao(MarketOverView.class, marketOverViewDao);
		registerDao(OptionalStamp.class, optionalStampDao);
		registerDao(StoneGold.class, stoneGoldDao);
        registerDao(CollectingOperLog.class, collectingOperLogDao);

	}

	public void clear() {
		advertInfoDaoConfig.getIdentityScope().clear();
		attentionItemDaoConfig.getIdentityScope().clear();
		focusNewDaoConfig.getIdentityScope().clear();
		nanJingDaoConfig.getIdentityScope().clear();
		beiJingDaoConfig.getIdentityScope().clear();
		shangHaiDaoConfig.getIdentityScope().clear();
		zhongNanDaoConfig.getIdentityScope().clear();
		dailyLimitBoardDaoConfig.getIdentityScope().clear();
		guestColumnDaoConfig.getIdentityScope().clear();
		marketOverViewDaoConfig.getIdentityScope().clear();
		optionalStampDaoConfig.getIdentityScope().clear();
		stoneGoldDaoConfig.getIdentityScope().clear();
        collectingOperLogDaoConfig.getIdentityScope().clear();
	}

	public AdvertInfoDao getAdvertInfoDao() {
		return advertInfoDao;
	}

	public AttentionItemDao getAttentionItemDao() {
		return attentionItemDao;
	}

	public FocusNewDao getFocusNewDao() {
		return focusNewDao;
	}

	public NanJingDao getNanJingDao() {
		return nanJingDao;
	}

	public BeiJingDao getBeiJingDao() {
		return beiJingDao;
	}

	public ShangHaiDao getShangHaiDao() {
		return shangHaiDao;
	}

	public ZhongNanDao getZhongNanDao() {
		return zhongNanDao;
	}

	public DailyLimitBoardDao getDailyLimitBoardDao() {
		return dailyLimitBoardDao;
	}

	public GuestColumnDao getGuestColumnDao() {
		return guestColumnDao;
	}

	public MarketOverViewDao getMarketOverViewDao() {
		return marketOverViewDao;
	}

	public OptionalStampDao getOptionalStampDao() {
		return optionalStampDao;
	}
	
	public StoneGoldDao getStoneGoldDao() {
        return stoneGoldDao;
    }

    public CollectingOperLogDao getCollectingOperLogDao() {
        return collectingOperLogDao;
    }
}
